package com.panfeng.xcloud.boss.provider.member.enums;

import lombok.Getter;

@Getter
public enum LoginModeEnum {

    /**
     * 登录方式 verifyCode:验证码 pwd:密码
     */
    LOGIN_MODE_VERIFY_CODE("verifyCode", "验证码"),

    LOGIN_MODE_PWD("pwd", "密码");

    private String value;

    private String desc;

    LoginModeEnum(String value, String desc) {
        this.value = value;
        this.desc = desc;
    }

    public static LoginModeEnum of(String value) {
        if (value != null) {
            for (LoginModeEnum s : values()) {
                if (s.value.equals(value)) {
                    return s;
                }
            }
        }
        return null;
    }

}
